﻿@page "{channelindex?}"
@using Cybertron.Tag
@inject Cybertron.Tag.ICmsTag cms
@{
    string _channelindex = RouteData.Values["channelindex"].ToString();
    int siteid = (int)ViewBag.SiteId;
    var channel = cms.channel.get(_channelindex, siteid);
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Pragma" content="no-cache">
    <title>@Html.Raw(string.IsNullOrEmpty(channel.seo_description)?channel.name:channel.seo_description)</title>
    <meta name="keywords" content="@channel.seo_keywords"/>
    <meta name="description" content="@channel.seo_description" />
    <link rel="stylesheet" type="text/css" href="/templates/hongyuan/css/index.min.css" />
</head>
<body>
    <div class="m-head">
        <a href="/" class="u-logo"></a>
        <div class="u-menu">
            <span></span>
            <b></b>
        </div>
        <div class="u-language">
            <a href="/">中</a><b>·</b><a href="/en">EN</a>
        </div>
        @Html.Partial("include/search",0)
    </div>
    <div class="u-search-box">
        @Html.Partial("include/msearch",0)
    </div>
    @Html.Partial("include/nav",0)
    <div class="m-banner">
        <img src="@channel.ext1" alt="" class="pc-banner">
        <img src="@channel.ext2" alt="" class="mib-banner">
        <img src="@channel.ext3" alt="" class="banner-text">
    </div>
    <div class="business-box">
        <div class="m-crumbs">
            <a href="/">Home</a>
            <b>·</b>
            <a href="javascript:;" class="z-current">@channel.name</a>
        </div>
        <div class="u-lan" data-scroll-reveal="enter right but wait 0.1s"></div>
        <div class="u-hui" data-scroll-reveal="enter left but wait 0.1s"></div>
        <div class="m-business">
            <div class="business-top" data-scroll-reveal="">
                <h3>@channel.subname</h3>
                <p>@channel.summary</p>
            </div>
            <ul class="business-ul">
                @{ 
                    var subchannels = cms.channel.get_list(m => m.ParentId == channel.id);
                    foreach (var _c in subchannels) {
                        <li data-scroll-reveal="">
                            <a href="@_c.url[0]" target="@_c.target">
                                <img src="@_c.picture" alt="">
                                <div class="business-title">
                                    <h3>@_c.name</h3>
                                    <p>@Html.Raw(_c.summary)</p>
                                    <span><i class="iconfont icon-jiantou4"></i></span>
                                </div>
                            </a>
                        </li>
                    }
                }

            </ul>
        </div>
    </div>

    @Html.Partial("include/foot",0)
    <script src="/templates/hongyuan/js/all.min.js" type="text/javascript" charset="utf-8"></script>
    <script>(function($) {
            window.scrollReveal = new scrollReveal({
                enter: 'bottom',
                after: '0.1s',
                reset: false,
                move: '50px'
            });
})();</script>
</body>
</html>